package com.vpen.picupload.controller;

import com.vpen.picupload.entity.Hobby;
import com.vpen.picupload.service.HobbyService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (Hobby)表控制层
 *
 * @author vpen
 * @since 2021-08-09 23:03:32
 */
@RestController
@RequestMapping("hobby")
public class HobbyController {
    /**
     * 服务对象
     */
    @Resource
    private HobbyService hobbyService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Hobby selectOne(Integer id) {
        return this.hobbyService.queryById(id);
    }

}